package yu.lin.ru.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import yu.lin.ru.demo.service.HelloServiceI;

@Controller
@RequestMapping("hello")
public class HelloController {
	
	@Autowired
	private HelloServiceI helloService;
	
	@RequestMapping("home")
	public String toHome(Model model) {
		String name = helloService.getName("日期");
		model.addAttribute("name", name);
		return "hello/home";
	}
}
